import VueRouter from 'vue-router'

// 导入组件模板
import HomeTab from './components/tab/home.vue'
import MemberTab from './components/tab/member.vue'
import ShopcarTab from './components/tab/shopcar.vue'
import SearchTab from './components/tab/search.vue'
import NewsList from './components/home/newslist.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/',redirect:'/home'},
    {path:'/home',component:HomeTab},
    {path:'/member',component:MemberTab},
    {path:'/shopcar',component:ShopcarTab},
    {path:'/search',component:SearchTab},
    {path:'/home/newslist',component:NewsList}
  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router